package rest

import "../dog"

type DogNamesModel struct {
	url_model
	DogNames []string
}

type DogNamesController struct {
	dogfactory *dog.DogFactory
}

func (this *DogNamesController) GetSourceName() string {
	return "/API/DogNames"
}

func (this *DogNamesController) IsRoot() bool {
	return true
}

func (this *DogNamesController) Get(interface{}) interface{} {
	dognames := this.dogfactory.GetAllDogNames()

	return DogNamesModel{
		url_model: url_model{
			Url: this.GetSourceName(),
		},
		DogNames: dognames,
	}
}
